﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" src="../common/jquery/jquery-1.5.1.min.js"></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	overflow:hidden;
}
.STYLE3 {font-size: 12px; color: #adc9d9; }
-->
</style>
<script type="text/javascript">
function changeRandImg(){
	document.getElementById("randImg").src='<%=basePath%>/common/image.jsp?date=\"'+new Date()+'\"';
}

function doSubmitForm(){
	var userName=$("#userName").val();
	var userPassWord=$("#userPassWord").val();
	var rand=$("#rand").val();
	$.ajax({
	   type: "POST",
	   data:{userName:userName,userPassWord:userPassWord,rand:rand},
	   url: "../doLogin.do",
	   dataType: "json",
	   success: function(data){
	   		alert(data.code);
	   		if(data.code=='Success'){
	   			location.href='<%=basePath%>web/test.html';
	   		}else{
	   			alert(data.msg);
	   		}
	   }
	}); 
}
</script>

</head>

<body>
<form action="">
<table width="100%"  height="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#1075b1">&nbsp;</td>
  </tr>
  <tr>
    <td height="608" background="<%=basePath%>/login/images/login_03.gif"><table width="847" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="318" background="<%=basePath%>/login/images/login_04.jpg">&nbsp;</td>
      </tr>
      <tr>
        <td height="84"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="381" height="84" background="<%=basePath%>/login/images/login_06.gif">&nbsp;</td>
            <td width="162" valign="middle" background="<%=basePath%>/login/images/login_07.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="44" height="24" valign="bottom"><div align="right"><span class="STYLE3">用户</span></div></td>
                <td width="10" valign="bottom">&nbsp;</td>
                <td height="24" colspan="2" valign="bottom">
                  <div align="left">
                    <input type="text" name="userName" id="userName" style="width:100px; height:17px; background-color:#87adbf; border:solid 1px #153966; font-size:12px; color:#283439; ">
                  </div></td>
              </tr>
              <tr>
                <td height="24" valign="bottom"><div align="right"><span class="STYLE3">密码</span></div></td>
                <td width="10" valign="bottom">&nbsp;</td>
                <td height="24" colspan="2" valign="bottom"><input type="password" name="userPassWord" id="userPassWord" style="width:100px; height:17px; background-color:#87adbf; border:solid 1px #153966; font-size:12px; color:#283439; "></td>
              </tr>
              <tr>
                <td height="24" valign="bottom"><div align="right"><span class="STYLE3">验证码</span></div></td>
                <td width="10" valign="bottom">&nbsp;</td>
                <td width="52" height="24" valign="bottom"><input type="text" name="rand" id="rand" style="width:50px; height:17px; background-color:#87adbf; border:solid 1px #153966; font-size:12px; color:#283439; "></td>
                <td width="62" valign="bottom"><div align="left"><img id='randImg' border=0 src='<%=basePath%>/common/image.jsp' width="38" height="15" onclick="changeRandImg()" style="cursor: pointer;" ></div></td>
              </tr>
              <tr></tr>
            </table></td>
            <td width="26"><img src="<%=basePath%>/login/images/login_08.gif" width="26" height="84"></td>
            <td width="67" background="<%=basePath%>/login/images/login_09.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="25"><div align="center" >
                <input type="button" style="width:57; height:20; border: 0;background-image:url(<%=basePath%>/login/images/dl.gif);cursor: pointer;" value="" onclick="doSubmitForm();"/>
                </div></td>
              </tr>
              <tr>
                <td height="25"><div align="center">
                <input type="reset" style="width:57; height:20; border: 0;background-image:url(<%=basePath%>/login/images/cz.gif);cursor: pointer;" value="" />
                </div></td>
              </tr>
            </table></td>
            <td width="211" background="<%=basePath%>/login/images/login_10.gif">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="206" background="<%=basePath%>/login/images/login_11.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td bgcolor="#152753">&nbsp;</td>
  </tr>
</table>
</form>
</body>
</html>
